
// const rootPath = 'http://120.77.66.252:8083/api';
const rootPath = 'http://127.0.0.1:8100/api';

// const rootPath = 'http://savoro2o.hisense.com/api';
const imgPath = 'http://izjzg.dev.mhaitun.com/';

var config = {
    rootPath: rootPath,
   imgPath: imgPath,
   oauth: rootPath + '/oauth/token',
   register: rootPath + '/mobile/user/register',
   deptTree: rootPath + '/depts/getJsonTree',
   depts: rootPath + '/depts',
   users: rootPath + "/users",
   changeDeptEmp: rootPath + '/users/changeDeptEmp',

   //菜单管理API
   menuTree: rootPath + '/menus/getJsonTree',
   menu: rootPath + "/menus",
   getMenu: rootPath + '/menus',
   updateMenu: rootPath + '/menus',
   addMenu: rootPath + '/menus',
   getRoleList: rootPath + '/roles/list',
   addMenuRole: rootPath + '/menus',
   menuTreeByUser: rootPath + "/menus/users/",

   //role
    postRole: rootPath + '/roles',
    getRoles: rootPath + '/roles',
    deleteRole: rootPath + '/roles',

}

Date.prototype.Format = function (fmt) { //author: meizz 
    var o = {
        "M+": this.getMonth() + 1, //月份 
        "d+": this.getDate(), //日 
        "h+": this.getHours(), //小时 
        "m+": this.getMinutes(), //分 
        "s+": this.getSeconds(), //秒 
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
        "S": this.getMilliseconds() //毫秒 
    };
    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}

export default config;